VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. You know how like on YouTube people upload music but in the picture is only the album art?

    That is what I am looking to do. I have used Balabolka and IVONA2 TTS voices to create some audiobooks.
    Along with the audio file it (Balabolka) can create a .srt subtitle file along with it. I would like to be able to
    listen to the audiobook while also being able to see the text from it.

    So my question is, how with what tool do others do this? Can this be done with Hybrid or ffmpeg?
    Quote Quote  
  2. Are you an Avisynth user? It's probably the sort of thing for which you'll have to create an Avisynth script manually, especially if you want the picture to change periodically. If there's more than one picture and they're not the same dimensions, they'll need to be cropped and resized, or resized with borders added.

    I just cobbled together some unrelated pics, audio and subtitles as an example Avisynth script, if you want to give yourself a crash course in Avisynth. It does have a bit of a learning curve. The video is attached below.

    Code:
    LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
    LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\VSFilter.dll")
    
    Pic1 = ImageSource("D:\New Folder\Pic1.bmp").ConvertToYV12().CropResize(1280,720, Borders=true)
    Pic2 = ImageSource("D:\New Folder\Pic2.bmp").ConvertToYV12().CropResize(1280,720, Borders=true)
    Pic3 = ImageSource("D:\New Folder\Pic3.bmp").ConvertToYV12().CropResize(1280,720, Borders=true)
    
    Video = \
    Pic1.Trim(1,1).Loop(500) ++ \
    Pic2.Trim(1,1).Loop(500) ++ \
    Pic3.Trim(1,1).Loop(500)
    
    Video = Video.TextSub("D:\Some Subtitles.srt", 1)
    
    Audio = FFAudioSource("D:\An MP3.mp3")
    
    AudioDub(Video, Audio)
    I assume YouTube videos are normally uploaded as YV12 rather than RGB?

    Edit: I just read Selur's post below. It appears Hybrid makes it easier.
    Image Attached Files
    Last edited by hello_hello; 8th Nov 2021 at 09:09.
    Quote Quote  
  3. If you use Hybrid, you could tell it your input is an image sequence, select your frame as first frame, enable 'Single image' and adjust "Frame rate" and "Frame count" so that the length matches the length of your audio source. Then load your audio source and your subitles.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Thank you both.

    I am not an avisynth user so I will try the Hybrid method.
    Quote Quote  
  5. @Selur

    Which tabs have the options to "select your frame as first frame" and "enable 'Single image'"?

    Also, does the image sequence option have to be in a certain picture format? I tried feeding it a jpg after ticking that
    option (image sequence) but it will not accept it. I am guessing because maybe I haven't found the other options you speak of yet.
    Quote Quote  
  6. Got no problem with: *.png, *.tga, *.tif. *.exr, *.jpg files.
    Sounds like you didn't actually open the image sequence dialog,...


    -> not sure Hybrid is the right tool for you,....
    Youg might be better of using FFmpeg:
    Code:
    ffmpeg -i "PATH TO AUDIO" -loop 1 -i "PATH TO IMAGE FILE" -c:v libx264 -r FRAME_RATE -vf subtitles="PATH TO SUBTITLE FILE" -pix_fmt yuv420p -c:a copy -map 1:v -map 0:a -shortest "PATH TO OUTPUT FILE"
    i.e.
    Code:
    ffmpeg -i "q:\my_audio.mp3" -loop 1 -i "w:\my_image.png" -c:v libx264 -r 6 -vf subtitles="i:\my\subtitles.srt" -pix_fmt yuv420p -c:a copy -map 1:v -map 0:a -shortest "z:\finished\video.mp4"
    (not sure whether subtitle requires backslashes need to be escaped with additional backslashes or could be replaced through slashes)


    (untested but should work)

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  7. I didn't know there was a dialog for it, I mostly use drag and drop.

    Thank you. I will see what I can do with it now.
    Last edited by 60fpshacksrock; 8th Nov 2021 at 16:08.
    Quote Quote  
  8. I could not get Hybrid to work , so I tried ffmpeg and got this:
    Image Attached Thumbnails Click image for larger version

Name:	ffm.png
Views:	13
Size:	3.8 KB
ID:	61706  

    Quote Quote  
  9. Got a little further after converting the subtitles to a different format:
    Image Attached Thumbnails Click image for larger version

Name:	ffm2.png
Views:	6
Size:	12.7 KB
ID:	61707  

    Quote Quote  
  10. Make sure the witdh and height of your image is evenly dividable by 2 (learn how to add borders to archive it in ffmpeg), not evenly dividable by 2 content can't be converted to YV12.
    -> if you want to understand what is happening and why you might want to start reading up what color sampling is.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  11. I will look into that, thanks.

    Edit: Got a bit further using info found on stackoverflow but then I ran into this: "Output file #0 does not contain any stream"
    Last edited by 60fpshacksrock; 10th Nov 2021 at 08:19.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!