lisamelton / other_video_transcoding

Other tools to transcode videos.
MIT License
549 stars 25 forks source link

"Scan - Media" - option #11

Closed pat-e closed 4 years ago

pat-e commented 4 years ago

Enhancement:

Would it be possible to add an option (compared to transcode_video --scan) to view the media mapping.

lisamelton commented 4 years ago

@pat-e It's possible, but I fear it will require a significant amount of coding to get the formatting right. It's not the effort that concerns me, it's size of the code required. I like to keep the source as small and as simple as possible.

You can get a "poor man's" version of a scan now by adding --dry-run --debug to your command line. Of course, that will also produce output you probably don't want.

But what are you trying to learn about your input from a scan? Is it simply the index numbers of the various audio and subtitle tracks?

pat-e commented 4 years ago

Hi @donmelton. Thank you for the nice reply.

Basically the same like "transcode-video --scan" so I can see the resolution of a video, the audio tracks number, language and format and subtitle number, language, format and if "forced".

But if it is not possible to make it "quick", I understand. Then I will use "transcode-video --scan" and then "other-video" for final transcoding.

The thing is, English is not my native language so I always produce multi-language videos. So I want my native language as primary and add English as additional language.

asheimo commented 4 years ago

@pat-e This might help you too: For a quick summary use mkvmerge --identify yourfile.mkv. For even more details such as track languages, file titles etc. you can also use mkvmerge --identify-verbose yourfile.mkv. Please note that the output is escaped in a specific way.

https://gitlab.com/mbunkus/mkvtoolnix/-/wikis/mkvinfo-track-summary

lisamelton commented 4 years ago

@pat-e Using transcode-video --scan in the interim is a great idea, actually!

And @pat-e is correct (thank you!), that the MKVToolNix command line utilities are very helpful for dumping file information.

I would also recommend using mediainfo available here: https://mediaarea.net/en/MediaInfo

In the meantime, I'll start hacking on something and see if I can keep the code size small. :)

lisamelton commented 4 years ago

@pat-e I have implemented the --scan option and checked it into GitHub. You can download the new code here (along with some other changes) if you want to try it out:

https://raw.githubusercontent.com/donmelton/other_video_transcoding/master/bin/other-transcode

I'll probably release it as version 0.3.0 sometime later this week.

Sorry this took so long.

pat-e commented 4 years ago

@donmelton : Sorry for my to take so long to respond, but I was not able to check until now:

The new "--scan" - Option looks ... GREAT 👍 Exactly what I wanted / needed and much better then I imagined.

The option can even be used by scanning a whole directory.

I'm using Windows with PowerShell, so output might look different for other people using different OS.

PS D:\temp> other-transcode.bat --scan 'D:\files\example.mkv' Verifying "ffprobe" availability... Verifying "ffmpeg" availability... Verifying "mkvpropedit" availability... Scanning media... D:\files\example.mkv format = h264 / 1920 x 1080 / 24000/1001 fps duration = 01:55:54.995

1 audio:

  format = dts (DTS-HD MA) / 5.1(side)
language = ger
   title = German DTS-HD 5.1 3830 kbps

2 audio:

  format = dts / 5.1(side)
language = ger
   title = German DTS 5.1 755 kbps Original

3 audio:

  format = dts (DTS-HD MA) / 5.1(side)
language = eng
   title = English DTS-HD 5.1 3830 kbps

1 subtitle:

language = ger
   flags = default

2 subtitle:

language = ger
   title = German Forced
   flags = forced

3 subtitle:

language = eng

What would be nice for the subtitle, if it would also give the format (so if it is SUP / IDX_SUB / SRT / ASS / ...).

But with the Video-information and Audio-information: Couldn't make it better myself.

It would be nice if this change could also go into the next version.

Thank you very much for it.

Regards,

lisamelton commented 4 years ago

@pat-e Thanks! I'm glad you like the new --scan implementation and that it's working well for you.

I actually included the subtitle format in early versions of my implementation but I removed that. Since most users will be running --scan on disc rips then all they will ever see is "hdmv_pgs_subtitle" or "dvd_subtitle". That's not very useful and it wastes yet another line in the output. So I'm not inclined to put that back in. But I will consider it.

pat-e commented 4 years ago

Well, sometimes the source is that unknown file / backup you got from your local LAN-Party and your device wont play it properly ... 😄 So I put it through the transcoder and make it 100% compatible with every device I use (Plex with a mix of HTPC, iPhone, Android and Web-browser...).

lisamelton commented 4 years ago

@pat-e OK, I have added subtitle format information to the --scan output.

pat-e commented 4 years ago

@donmelton : Tested, perfect.

From my pov, if you keep the "scan" - option in future versions, this ticket can be closed as Successful.

Thank you very much for your time and effort.

Regards,

lisamelton commented 4 years ago

@pat-e Thanks for testing and I'll glad you like it. The code has now been released. Just gem update other_video_transcoding to get the new version.

I'll close this now.